import numpy
import mdp

class Eigenfaces:

	def __init__(self, matrix):
		self.pca = mdp.nodes.NIPALSNode(output_dim = 0.90, conv = 0.01, max_it = 2000)
		self.pca.train(matrix)
		self.pca.stop_training()
	
	def project(self, matrix):
		return self.pca.execute(matrix)
